<template>
	<div>
		<Menu/>
		<Head/>
		<div class="company_main">
			<el-row class="mb-4">
				<el-button type="primary" @click="getStockList(1)">社保基金</el-button>
				<el-button type="primary" @click="getStockList(2)">候选</el-button>
				<el-button type="primary" @click="getStockList(3)">待机</el-button>
				<el-button type="primary" @click="getStockList(4)">持仓</el-button>
			</el-row>
			<div> &nbsp; </div>
			<el-table :data="stock_list" empty-text="暂无数据" :header-cell-style="{ 'text-align': 'left' , 'height':'20px'}" :cell-style="{'text-align': 'left'}">
				<el-table-column prop="Sid" label="ID" fixed="left" width="60" show-overflow-tooltip></el-table-column>
				<el-table-column prop="Stock_name" label="证券名称" width="100" align="center"></el-table-column>
				<el-table-column prop="Price" label="现价" width="100" show-overflow-tooltip></el-table-column>
				<el-table-column prop="Seventy_percent" label="筹码90%A" width="100" show-overflow-tooltip> </el-table-column>
				<el-table-column prop="Region" label="GL估值" show-overflow-tooltip> </el-table-column>
				<el-table-column prop="Jys" label="LQ估值" show-overflow-tooltip> </el-table-column>
				<el-table-column prop="Jys" label="差率" show-overflow-tooltip> </el-table-column>
				<el-table-column prop="Jys" label="增长率" show-overflow-tooltip> </el-table-column>
				<el-table-column prop="Ttm" label="PE(TTM)" show-overflow-tooltip> </el-table-column>
				<el-table-column prop="Pb" label="PB" show-overflow-tooltip> </el-table-column>
				<el-table-column prop="Jys" label="股息率" show-overflow-tooltip> </el-table-column>
				<el-table-column prop="Jys" label="市销率" show-overflow-tooltip> </el-table-column>
				<el-table-column prop="Asset_liability_ratio" label="负债率" show-overflow-tooltip> </el-table-column>
				<el-table-column prop="Roe" label="ROE" show-overflow-tooltip> </el-table-column>
				<el-table-column prop="Jys" label="流动比率" show-overflow-tooltip> </el-table-column>
				<el-table-column prop="Jys" label="主营收率" show-overflow-tooltip> </el-table-column>
				<el-table-column prop="Jys" label="每股经营现金流" show-overflow-tooltip> </el-table-column>
				<el-table-column prop="Jys" label="总债/金" show-overflow-tooltip> </el-table-column>
				<el-table-column prop="Jys" label="总资产周转率(天)" show-overflow-tooltip> </el-table-column>
				<el-table-column prop="Jys" label="增发" show-overflow-tooltip> </el-table-column>
				<el-table-column prop="Jys" label="质押比率" show-overflow-tooltip> </el-table-column>
				<el-table-column prop="Jys" label="发债" show-overflow-tooltip> </el-table-column>
				<el-table-column prop="Jys" label="持股者" show-overflow-tooltip> </el-table-column>
				<el-table-column prop="Jys" label="行业排名" show-overflow-tooltip> </el-table-column>
				<el-table-column prop="Jys" label="得分" show-overflow-tooltip> </el-table-column>
				<el-table-column prop="Jys" label="操作" show-overflow-tooltip> </el-table-column>
			</el-table>
		</div>
	</div>
</template>

<script lang="ts">
	import {Check,Delete,Edit,Message,Search,Star,} from '@element-plus/icons-vue'
	import Menu from '../../components/Menu.vue'
	import Head from '../../components/Head.vue'
	export default {
		name:"StockListView",
		components:{
			Menu,
			Head,
		},
		data(){
			return {
				stock_list:[]
			}
		},
		methods:{
			getStockList(type){
				var thisInfo = this
				this.$axios.post('/api/v1/stock/stock_list', {}, {headers:{'Content-Type':'"application/x-www-form-urlencoded;charset=UTF-8'}}).then(function (response) {
					thisInfo.stock_list = response.data.data.list
				});
			},
		},
		mounted: function(){
			this.getStockList(0);
		}
	}
</script>
<style scoped>
	.company_main{
		width: 86%;
		height: 100%;
		/* background: goldenrod; */
		float: left; 
		margin-top: 0.4%;
		margin-left: 0.6%;
	}
	
	.tableRowClassName .warning-row{
		background: red;
	}
	
	.stockLi{
		float: left;
		background: red;
	}
</style>